package com.code.generation.utils;

/**
 * @ProjectName: codegeneration
 * @Package: com.code.generation.utils
 * @Description:
 * @Author: DongJW
 * @CreateDate: 2020/11/29 11:38
 * @Version: 1.0
 */
public class StringUtil {

    public static boolean contains(String str,String... keys) {
        if (null==str || "".equals(str)) {
            return false;
        }
        if (null == keys){
            try {
                throw new IllegalAccessException("'keys' is null ");
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }
        for (String key: keys){
            if (key.toLowerCase().contains(str)){
                return true;
            }
        }
        return false;
    }
}
